<template>
  <div>
    <el-card class="box-card">
      <template #header>
        <div class="title">展示省级、市级：</div>
      </template>
      <m-choose-area @change="areaChange"></m-choose-area>
    </el-card>
    <el-card class="box-card">
      <template #header>
        <div class="title">展示省级、市级、区域：</div>
      </template>
      <m-choose-area @change="areaChange" showArea></m-choose-area>
    </el-card>
    <el-card class="box-card">
      <template #header>
        <div class="title">展示省级、市级、区域、街道：</div>
      </template>
      <m-choose-area @change="areaChange" showArea showStreet></m-choose-area>
    </el-card>
    <el-card class="box-card">
      <template #header>
        <div class="title">自定义宽度：</div>
      </template>
      <m-choose-area @change="areaChange" width="120px" showArea showStreet></m-choose-area>
    </el-card>

  </div>
</template>

<script lang='ts' setup>
const areaChange = (data: any) => {
  console.log(data);
};
</script>
<style lang="scss" scoped>
.title {
  padding: 10px 0;
}
</style>
